<div class="lateral_esquerda1"></div>
<div class="form" style="margin-left: 250px;">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'imagens-form',
        'enableAjaxValidation' => false,
        'htmlOptions'=>array('enctype'=>'multipart/form-data'),
            ));
    
    ?>
    
<?php echo $form->errorSummary($model); ?>

    <table>
        <tr>
            <td>
                <?php echo $form->labelEx($model, 'Nome da Obra'); ?>
                <?php echo $_GET['obra'];
                $model->id_obra = $_GET['id'];                                
                echo $form->hiddenField($model, 'id_obra'); ?>                
            </td>
        </tr>        
        <tr>
            <td>
                <?php echo $form->labelEx($model,'imagem'); ?>
		<?php echo CHtml::activeFileField($model, 'imagem'); ?>
                <?php //echo CHtml::image(Yii::app()->baseUrl . '/images/' . $model->imagem, $alt='',$htmlOptions=array ("width"=>"300", "height"=>"220")); ?>
		<?php echo $form->error($model,'imagem'); ?>
            </td>
        </tr>    
        <tr>
            <td>
                <?php echo CHtml::submitButton($model->isNewRecord ? 'Novo' : 'Salvar'); ?>
            </td>
        </tr>
    </table>


<?php $this->endWidget(); ?>

</div><!-- form -->